import request from '@/utils/request'

// 查询司机管理列表
export function listDriver(query) {
  return request({
    url: '/manager/driver/list',
    method: 'get',
    params: query
  })
}

// 查询司机管理详细
export function getDriver(driverID) {
  return request({
    url: '/manager/driver/' + driverID,
    method: 'get'
  })
}

// 新增司机管理
export function addDriver(data) {
  return request({
    url: '/manager/driver',
    method: 'post',
    data: data
  })
}

// 修改司机管理
export function updateDriver(data) {
  return request({
    url: '/manager/driver',
    method: 'put',
    data: data
  })
}

// 删除司机管理
export function delDriver(driverID) {
  return request({
    url: '/manager/driver/' + driverID,
    method: 'delete'
  })
}

// 导出司机管理
export function exportDriver(query) {
  return request({
    url: '/manager/driver/export',
    method: 'get',
    params: query
  })
}

// 冻结司机
export function lightDriver(driverID) {
  return request({
    url: '/manager/driver/light/' + driverID,
    method: 'put',
  })
}
